import request from '@/utils/request'

export const uploadForm = (data) => {
  return request({
    url: '/flowable/form/save',
    method: 'post',
    data: data
  })
}

// 新增form-flow关联信息
export const addFormFlow = (data) => {
  return request({
    url: '/flowable/form/formFlow',
    method: 'put',
    data: data
  })
}
export const updateFormFlow = (data) => {
  return request({
    url: '/flowable/form/updateFormFlow',
    method: 'post',
    data: data
  })
}
export const getFormFlow = (data) => {
  return request({
    url: '/flowable/form/formFlow',
    method: 'post',
    data: data
  })
}

export const getForm = (id) => {
  return request({
    url: '/flowable/form/get/' + `${id}`,
    method: 'get',
  })
}
export const delFormAndFlow = (id) => {
  return request({
    url: '/flowable/form/del/' + `${id}`,
    method: 'delete',
  })
}

export const changeFormFlowstatus = (id, status) => {
  return request({
    url: '/flowable/form/changeFormFlowstatus',
    method: 'put',
    params: {
      id: id,
      status: status
    }
  })
}

export const editProcess = (id) => {
  return request({
    url: '/flowable/form/edit/' + `${id}`,
    method: 'get',
  })
}